#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <tbb/parallel_for.h>

using namespace tbb;
using namespace std;


int main() {

    size_t n = 8;
    vector<float> a(n);

    tbb::parallel_for(tbb::blocked_range<size_t>(0, n),
        [&](tbb::blocked_range<size_t> r) {

            for (size_t i = r.begin(); i < r.end(); ++i) {
                a[i] = sin(i);
            }

        });

    return 0;
}